package com.zp.self.module.返回xml结构数据.工作中AEMP的使用;

import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
import lombok.Builder;
import lombok.Data;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import java.math.BigDecimal;
import java.util.List;

/**
 * @author ：by peng.zeng
 * @date ：Created 2021/5/21 17:03
 * @description ：设备信息
 */
@Data
@Builder
@JacksonXmlRootElement(localName = "Equipment")
public class Equipment {

    @JacksonXmlProperty(localName = "EquipmentHeader")
    private EquipmentHeader header;

//    @JacksonXmlProperty(localName = "Locations")
//    private List<LocationInfo> locals;
    @JacksonXmlElementWrapper(useWrapping = false)
    @JacksonXmlProperty(localName = "Location")
    private LocationInfo[] local1;

    //    @XmlElementWrapper(name="allnames")
//    @XmlElement(name="myname")
    @JacksonXmlElementWrapper(localName="a")
    @JacksonXmlProperty(localName = "b")
    private List<LocationInfo> listLocal1;

//    @JacksonXmlProperty(localName = "Location")
//    private LocationInfo local2;
//    @JacksonXmlProperty(localName = "Location")
//    private LocationInfo local3;


    @JacksonXmlProperty(localName = "Hour")
    private BigDecimal hour;
}
